﻿#ifndef DAAPPCORE_H
#define DAAPPCORE_H
#include "DACoreInterface.h"

namespace DA
{
class DAAppUI;
class DAAppRibbonArea;
class DAAppDataManager;
/**
 * @brief DA的核心接口,作为单例存在
 */
class DAAppCore : public DACoreInterface
{
    Q_OBJECT
    DAAppCore(QObject* p = nullptr);

public:
    static DAAppCore& getInstance();

    //获取DAAppRibbonAreaInterface
    DAAppUIInterface* getUiInterface() const override;

    //调用此函数，创建DAAppUIInterface，此函数的调用应该发生在SARibbonMainWindow的构造过程
    void createUi(SARibbonMainWindow* mainwindow) override;

    // python内核是否初始化成功
    bool isPythonInterpreterInitialized() const override;

    //获取数据管理接口
    DADataManagerInterface* getDataManagerInterface() const override;

public:
    //设置python内核是否初始化成功
    void setPythonInterpreterInitializedMode(bool on);

private:
    DAAppUI* m_appUI;
    DAAppDataManager* m_dataManager;
    bool m_isPythonInterpreterInitialized;
};
}  // namespace DA
#endif  // DACORE_H
